﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
//ExternalObject
namespace DockSample
{
    class ExternalInterfaceIn : ObjectDiagram
    {
        //暂时用不到此属性，以后可能根据此把外部接口和他的实体Diagram对应起来
        private string upLevelDiagramId;
        public string UpLevelDiagramId
        {
            get { return upLevelDiagramId; }
            set { upLevelDiagramId = value; }
        }

        public ExternalInterfaceIn(Point point, int width = 140, int height = 80)
            : base(point,width,height)
        {

        }

        public override void Drawing(Graphics graphics, DummyModelForm m)
        {
            
            int distance = 5;
            graphics.DrawRectangle(pen, new Rectangle(upLeftpoint.X, upLeftpoint.Y, width, height));
            graphics.DrawRectangle(pen, new Rectangle(upLeftpoint.X + distance, upLeftpoint.Y + distance, width - 2 * distance, height - 2 * distance));
//             graphics.DrawEllipse(pen, new Rectangle(upLeftpoint.X, upLeftpoint.Y, width, height));
//             graphics.DrawEllipse(pen, new Rectangle(upLeftpoint.X + distance, upLeftpoint.Y + distance, width - 2 * distance, height - 2 * distance));
            //graphics.DrawString(this.name,drawFont,drawBrush, new Point(upLeftpoint.X, upLeftpoint.Y+height));

            graphics.FillRectangle(new SolidBrush(Color.Black), 
                new Rectangle(upLeftpoint.X + distance, upLeftpoint.Y + distance, width - 2 * distance, height - 2 * distance));
            base.Drawing(graphics, m);
        }
    }
}
